package control;

public class TypeFilter {

	public static String NONE = "none";
	public static String SING = "sing";
	public static String PLURAL = "plural";
	
	private String type = NONE;
	private String genre = NONE;
	private String conjug = NONE;
	private String conjug_pers = NONE;
	private String plural = NONE;

	public TypeFilter() {

	}

	public TypeFilter(String _type) {
		setType(_type);
	}

	public TypeFilter(String _type, String _genre) {
		setType(_type);
		setGenre(_genre);
	}
	
	public TypeFilter(String _type, String _genre, String _plural) {
		setType(_type);
		setGenre(_genre);
		setPlural(_plural);
	}
	
	public TypeFilter(String _type, String _genre, String _plural, String _conjug) {
		setType(_type);
		setGenre(_genre);
		setPlural(_plural);
		setConjug(_conjug);
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setGenre(String genre) {
		this.genre = genre;
	}

	public String getGenre() {
		return genre;
	}

	public void setPlural(String plural) {
		this.plural = plural;
	}

	public String getPlural() {
		return plural;
	}

	public void setConjug(String conjug) {
		this.conjug = conjug;
	}

	public String getConjug() {
		return conjug;
	}

	public void setConjug_pers(String conjug_pers) {
		this.conjug_pers = conjug_pers;
	}

	public String getConjug_pers() {
		return conjug_pers;
	}
	
	public String toString() {
		String ret = "";
		
		if (!type.equals(NONE)) {
			ret += type + " ";
		}
		if (!genre.equals(NONE)) {
			ret += genre + " ";
		}
		if (!conjug.equals(NONE)) {
			ret += conjug + " ";
		}
		if (!conjug_pers.equals(NONE)) {
			ret += conjug_pers + " ";
		}
		if (!plural.equals(NONE)) {
			ret += plural + " ";
		}
		
		ret = ret.substring(0, ret.length() - 1);
		
		return ret;
	}

	
}
